<template>
  <div class="common-table-operations-component">
    <div class="left-actions">
      <a-button type="primary" @click="$emit('add')">
        <PlusOutlined />
        {{ $t('setting.addConfig') }}
      </a-button>
      <a-button @click="$emit('refresh')">
        <ReloadOutlined />
        {{ $t('common.refresh') }}
      </a-button>
    </div>
    <div class="right-actions">
      <a-space>
        <a-button type="primary" @click="$emit('search')">
          <SearchOutlined />
          {{ $t('common.search') }}
        </a-button>
        <a-button @click="$emit('reset')">
          <ReloadOutlined />
          {{ $t('common.reset') }}
        </a-button>
      </a-space>
    </div>
  </div>
</template>

<script lang="ts" setup>
defineOptions({
  name: 'TableOperations'
})

defineEmits<{
  (e: 'add'): void
  (e: 'refresh'): void
  (e: 'search'): void
  (e: 'reset'): void
}>()
</script>

<style lang="scss" scoped>
@import '@/assets/styles/views/common.scss';

.common-table-operations-component {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
</style> 